<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="author" content="Aleks" />
    #INSERT_HEAD
	<title>EcataloguE Test Page</title>
</head>

<body>

<h3>All options with their proprietes for specified article</h3>
<BOUCLE_proprietes(ECATALOGUE_PROPRIETES){par num titre}>
    <B_options>
    [(#REM) Propriete titre ]
    <strong>[(#TITRE|supprimer_numero)]: </strong>
        <BOUCLE_options(ECATALOGUE_OPTIONS ecatalogue_articles_options){id_article=52}{id_propriete}{par num titre}>
            [(#REM) Option titre with comma if needed ]
            [(#TITRE|supprimer_numero)][(#COMPTEUR_BOUCLE|!={#TOTAL_BOUCLE}|?{ ',' })]
        </BOUCLE_options>
        <br />
    </B_options>
</BOUCLE_proprietes>

<br /><br />

<h3> All options with their proprietes for specified article and propriete type</h3>
<BOUCLE_proprietes2(ECATALOGUE_PROPRIETES){type=checkbox}{par num titre}>
    <B_options2>
    [(#REM) Propriete titre ]
    <strong>[(#TITRE|supprimer_numero)]: </strong>
        <BOUCLE_options2(ECATALOGUE_OPTIONS ecatalogue_articles_options){id_article=52}{id_propriete}{par num titre}>
            [(#REM) Option titre with comma if needed ]
            [(#TITRE|supprimer_numero)][(#COMPTEUR_BOUCLE|!={#TOTAL_BOUCLE}|?{ ',' })]
        </BOUCLE_options2>
        <br />
    </B_options2>
</BOUCLE_proprietes2>

<br /><br />

<h3>All options with their proprietes (links are used for filtering)</h3>
<BOUCLE_proprietes_filtering(ECATALOGUE_PROPRIETES){par num titre}>
    <B_options_filtering>
    [(#REM) Propriete titre ]
    <strong>[(#TITRE|supprimer_numero)]: </strong>
        <BOUCLE_options_filtering(ECATALOGUE_OPTIONS){id_propriete}{par num titre}>
            [(#REM) Option titre with comma if needed ]
            <a href="#ECATALOGUE_OPTION_FILTER_LINK{#ID_OPTION}">
            [(#TITRE|supprimer_numero)]
            </a>[(#COMPTEUR_BOUCLE|!={#TOTAL_BOUCLE}|?{ ',' })]
        </BOUCLE_options_filtering>
        <br />
    </B_options_filtering>
</BOUCLE_proprietes_filtering>

<h3>Filter products by options</h3>
#ECATALOGUE_OPTION_FILTER_RESULT

<br /><br />
<h3> Standart sorting </h3>
#ECATALOGUE_SORTING

<h3> Custom sorting </h3>
#ECATALOGUE_SORTING{select}
<h3> All articles-products with their characteristics </h3>
<B_products>
<table>
    <thead>
        <th>ID</th>
        <th>Name</th>
        <th>Sku</th>
        <th>Price</th>
        <th>Price Old</th>
    </thead>
    <tbody>
[(#REM) With {fusion id_equipment} we will output only one product from each equipment ]
<BOUCLE_products(ARTICLES spip_ecatalogue_products){statut=publie}{fusion id_equipment}{is_separate=1}
    {tri #ENV{sort_by, titre}}{inverse #ENV{sort_order, 0}}>
    <tr>    
        <td>#ID_ARTICLE</td>
        <td>#TITRE</td>
        <td>#SKU</td>
        
        <td>#ECATALOGUE_PRODUCT_CURRENCY_SIGN{#ID_ARTICLE, sign_pre} 
            #ECATALOGUE_PRODUCT_PRICE{#ID_ARTICLE}&nbsp; 
            #ECATALOGUE_PRODUCT_CURRENCY_SIGN{#ID_ARTICLE, sign_after}</td>        
        
        <td>#ECATALOGUE_CURRENCY_SIGN{UAH, sign_pre} 
            #ECATALOGUE_PRODUCT_PRICE{#ID_ARTICLE, UAH, priceold}&nbsp; 
            #ECATALOGUE_CURRENCY_SIGN{UAH, sign_after}</td>
    </tr>    
</BOUCLE_products>
    </tbody>
</table>
</B_products>
No products!
<//B_products>

<br /><br />

<h3> All equipment products for specified product </h3>
<BOUCLE_one_product(ARTICLES spip_ecatalogue_products){statut=publie}{id_article=1}>
<B_equipments>
<table>
    <thead>
        <th>ID</th>
        <th>Name</th>
        <th>Sku</th>
        <th>Price</th>
        <th>Price Old</th>
    </thead>
    <tbody>    
[(#REM) With {id_equipment=#ID_EQUIPMENT} we select all equipment products for given product ]
[(#REM) With {id_article!=#ID_ARTICLE} we won't output product itself ]
<BOUCLE_equipments(ARTICLES spip_ecatalogue_products){statut=publie}{!par date}{id_equipment=#ID_EQUIPMENT}{id_article!=#ID_ARTICLE}> 
    <tr>    
        <td>#ID_ARTICLE</td>
        <td>#TITRE</td>
        <td>#SKU</td>
        
        <td>#ECATALOGUE_PRODUCT_CURRENCY_SIGN{#ID_ARTICLE, sign_pre} 
            #ECATALOGUE_PRODUCT_PRICE{#ID_ARTICLE}&nbsp; 
            #ECATALOGUE_PRODUCT_CURRENCY_SIGN{#ID_ARTICLE, sign_after}</td>        
        
        <td>#ECATALOGUE_CURRENCY_SIGN{UAH, sign_pre} 
            #ECATALOGUE_PRODUCT_PRICE{#ID_ARTICLE, UAH, priceold}&nbsp; 
            #ECATALOGUE_CURRENCY_SIGN{UAH, sign_after}</td>
    </tr>    
</BOUCLE_equipments>
    </tbody>
</table>
</B_equipments>
No equipment products!
<//B_equipment>
</BOUCLE_one_product>

<br /><br />

<h3> Check if rubrique is ecatalogue rubrique </h3>
#SET{id_rubrique,2}
[(#GET{id_rubrique}|is_ecatalogue_rubrique|?{Rubrique #GET{id_rubrique} is ecatalogue rubrique!, Rubrique #GET{id_rubrique} is not ecatalogue rubrique!})]

<h3> Similar products for specified article </h3>
<BOUCLE_similars(ECATALOGUE_ARTICLES_SIMILARS){id_article=1}>
    <BOUCLE_sim_article(ARTICLES spip_ecatalogue_products){id_article=#ID_SIMILAR}{par titre}
        {id_article!=#ID_ARTICLE}>
            #ID_ARTICLE. <a href="#URL_ECRIRE{articles, id_article=#ID_ARTICLE}">#TITRE</a> - #PRICE<br />
	   </BOUCLE_sim_article>
	</BOUCLE_similars>
    No similars for article 1
<//B_similars>

<h3> Accessoires products for specified article </h3>
<BOUCLE_accessoires(ECATALOGUE_ARTICLES_ACCESSOIRES){id_article=1}>
    <BOUCLE_acc_article(ARTICLES spip_ecatalogue_products){id_article=#ID_ACCESSOIRE}{par titre}
        {id_article!=#ID_ARTICLE}>
            #ID_ARTICLE. <a href="#URL_ECRIRE{articles, id_article=#ID_ARTICLE}">#TITRE</a> - #PRICE<br />
	   </BOUCLE_acc_article>
	</BOUCLE_accessoires>
    No accessoires for article 1
<//B_accessoires>


<h3>Components of composite product</h3>
<B_components>
<table>
    <thead>
        <th>ID</th>
        <th>Name</th>
        <th>Sku</th>
        <th>Price</th>
        <th>Price Old</th>
    </thead>
    <tbody>
	<BOUCLE_components(ECATALOGUE_COMPOSITES_ARTICLES){id_composite=21}>
        <BOUCLE_comp_articles(ARTICLES spip_ecatalogue_products){id_article=#ID_ARTICLE}{par titre}
            {id_article!=#ENV{id_article}}{statut IN publie,prepa}>        
		<tr>    
            <td>#ID_ARTICLE</td>
            <td>#TITRE</td>
            <td>#SKU</td>
        
            <td>#ECATALOGUE_PRODUCT_CURRENCY_SIGN{#ID_ARTICLE, sign_pre} 
                #ECATALOGUE_PRODUCT_PRICE{#ID_ARTICLE}&nbsp; 
                #ECATALOGUE_PRODUCT_CURRENCY_SIGN{#ID_ARTICLE, sign_after}</td>        
        
            <td>#ECATALOGUE_CURRENCY_SIGN{UAH, sign_pre} 
                #ECATALOGUE_PRODUCT_PRICE{#ID_ARTICLE, UAH, priceold}&nbsp; 
                #ECATALOGUE_CURRENCY_SIGN{UAH, sign_after}</td>
        </tr>
	   </BOUCLE_comp_articles>
	</BOUCLE_components>
	</tbody>
</table>
</B_components>
    No components for article 18
<//B_components>

</body>
</html>